# Fetching a list of Daily Scheduled Hours (Story Allocation Days)

Returns all Daily Scheduled Hours that are visible to the requester,
based on permissions. Filter results by specific projects, users, tasks, and more.
**NOTES**:
- The response includes Daily Scheduled Hours that are part of inactive Assignments, by default.
To filter these out, use the `current` parameter.
- If you are an Account Administrator, you can use the `only_my_account` parameter to filter for
Daily Scheduled Hours from only your account. This optimizes performance of the endpoint.

The returned Daily Scheduled Hours are sorted by when they were last updated.
This endpoint returns structured Daily Scheduled Hours (Story Allocation Day) objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `story_allocation_days` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: GET /story_allocation_days
Version: 1.0.0

## Query parameters:

  - `assignee_id` (integer)
    Returns Daily Scheduled Hours that are assigned to the User of the specified ID.

  - `assignment_id` (integer)
    Returns Daily Scheduled Hours that belong to the Assignment of the specified ID.

  - `created_after` (string)
    Filter for records created after a specified datetime. The datetime must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `created_before` (string)
    Filter for records created before a specified datetime. The datetime must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `current` (boolean)
    Returns Daily Scheduled Hours that belong to active Assignments.

  - `date_between` (string)
    Requires a colon separated pair of dates in YYYY-MM-DD format. Results are inclusive of the endpoints. If a date is not passed in, it is interpreted as negative or positive infinity.

  - `external_reference_external_message` (string)
    Filter the objects based on the external message of their associated external references. This is an exact match.

  - `external_reference_external_status` (string)
    Filter by the status of the external object in the external system.

  - `external_reference_service_model` (string)
    Filter by the type of the external object this external reference belongs to.

  - `external_reference_service_model_ref` (integer)
    Filter by the id of the external object this external reference belongs to.

  - `external_reference_service_model_refs` (string)
    Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

  - `external_reference_service_name` (string)
    Filter by the name of the provider for integration.

  - `external_reference_status` (string)
    Filter by the status of the integration, this can be successful or fail.

  - `has_external_references` (boolean)
    Filter by whether or not the object has external references.

  - `in_unarchived_stories` (boolean)
    Returns Daily Scheduled Hours that belong to active (not archived) Stories.

  - `in_unarchived_workspaces` (boolean)
    Returns Daily Scheduled Hours that belong to active (not archived) Workspaces.

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `assignment` (Assignment) - Reference the Assignment of the Story Allocation Day.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `story` (Story) - Reference the Story of the Story Allocation Day.
- `workspace` (Workspace) - Reference the Workspace of the Story Allocation Day.

  - `include_unnamed` (boolean)
    Includes Daily Scheduled Hours from Assignments with
[unnamed resources](https://knowledge.kantata.com/hc/en-us/articles/115004696493#Unnamed).
Think of unnamed resources as placeholders; it indicates the need for a certain role,
before knowing who will fill it.

Set to `False` by default.

  - `only` (string)
    Allows you to request one or more resources directly by ID. Multiple IDs can be supplied
in a comma separated list, like `GET /api/v1/workspaces.json?only=5,6,7`.

  - `only_my_account` (boolean)
    If you are an Account Administrator, you can set this to `True` in order to filter
for Daily Scheduled Hours from only your account.

Enabling this filter optimizes performance of the endpoint.
The filter is set to `False` by default.

  - `order` (string)
    Supply `order` with the name of a valid sort field for the endpoint and a direction.

Valid values: `created_at:asc`, `created_at:desc`, `date:asc`, `date:desc`, `id:asc`, `id:desc`, `updated_at:asc`, and `updated_at:desc`.

  - `page` (integer)

  - `per_page` (integer)

  - `story_id` (integer)
    Returns Daily Scheduled Hours that belong to the Story of the specified ID.

  - `uncurrent` (boolean)
    Returns Daily Scheduled Hours that belong to inactive Assignments.

  - `updated_after` (string)
    Filter for records updated after a specified datetime. The datetime must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `updated_at_between` (string)
    Requires a colon separated pair of timestamps. Timestamps are in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) with colons removed. Results are inclusive of the endpoints. If a timestamp is not passed in, it is interpreted as negative or positive infinity.

  - `updated_before` (string)
    Filter for records updated before a specified datetime. The datetime must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `without_external_reference_service_name` (string)
    Exclude by the existence of an external reference with the specified service name.

  - `workspace_id` (integer)
    Returns Daily Scheduled Hours that belong to the Workspace of the specified ID.

## Response 200:

  - `200` (unknown)
    A list of Daily Scheduled Hours (Story Allocation Day)s have been retrieved.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `story_allocation_days` (object)

  - `external_references` (object)

  - `assignments` (object)

  - `stories` (object)

  - `workspaces` (object)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403:

  - `403` (unknown)
    Forbidden request

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404:

  - `404` (unknown)
    Page Not Found

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503:

  - `503` (unknown)
    Service is unavailable

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

